package com.imau.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imau.bean.SysDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface SysDeptMapper extends BaseMapper<SysDept>
{

    SysDept selectByKey(@Param("did") String did);

    /**
     * 修改子元素关系
     *
     * @param depts 子元素
     * @return 结果
     */
    public int updateDeptChildren(@Param("depts") List<SysDept> depts);

    /**
     * 修改祖籍节点的状态
     *
     * @param deptIds 祖籍节点id
     * @return 结果
     */
    public int updateDeptStatusNormal(String []deptIds);
    public SysDept selectByParentId(@Param("parentId") String parentId);

    /*查询所有子节点**/
    public List<SysDept> selectChildByParentId(@Param("parentId") String parentId);
}
